using System.Collections;

namespace OpenXmlWriter.Packaging
{
  public class OpenXmlPartCollection : DictionaryBase
  {
    public void Add(string key, OpenXmlPart value)
    {
      Dictionary.Add(key, value);
    }

    public OpenXmlPart this[string key]
    {
      get
      {
        return (OpenXmlPart) Dictionary[key];
      }
    }

    public bool ContainsKey(string key)
    {
      foreach (string k in Dictionary.Keys)
      {
        if (k == key)
        {
          return true;
        }
      }
      return false;
    }

    public ICollection Values
    {
      get
      {
        return Dictionary.Values;
      }
    }
  }
}